// import com.alibaba.druid.util.FnvHash;

// import java.util.Arrays;
// import java.util.HashMap;
// import java.util.Map;
#pragma once
#include <unordered_map>
#include <vector>
#include "Token.h"
#include "../../utils/common_ptr.h"

class Keywords
{
public:
  static bool __init;
  static bool init();

  std::shared_ptr<std::unordered_map<std::string, Token_ptr>> keywords;

  std::vector<long> hashArray;
  std::vector<Token_ptr> tokens;

  static Keywords_ptr DEFAULT_KEYWORDS;
  static Keywords_ptr SQLITE_KEYWORDS;
  static Keywords_ptr DM_KEYWORDS;

  bool containsValue(Token_ptr token);

  Keywords(std::shared_ptr<std::unordered_map<std::string, Token_ptr>> keywords);

  Token_ptr getKeyword(long hash);

  Token_ptr getKeyword(std::string key);

  std::shared_ptr<std::unordered_map<std::string, Token_ptr>> getKeywords();
};
